MCI-Java: A Modified Java Virtual Machine Approach to Multiple Code Inheritance
نویسنده
چکیده
Java has multiple inheritance of interfaces, but only single inheritance of code via classes. This situation results in duplicated code in Java library classes and application code. We describe a generalization to the Java language syntax and the Java Virtual Machine (JVM) to support multiple inheritance of code, called MCI-Java. Our approach places multiply-inherited code in a new language construct called an implementation, which lies between an interface and a class in the inheritance hierarchy. MCI-Java does not support multiply-inherited data, which can cause modeling and performance problems. The MCI-Java extension is implemented by making minimal changes to the Java syntax, small changes to a compiler (IBM Jikes), and modest localized changes to a JVM (SUN JDK 1.2.2). The JVM changes result in no measurable performance overhead in real applications.
منابع مشابه
Multiple Code Inheritance in Java
Java has multiple inheritance of interfaces, but only single inheritance of code. This situation leads to code being duplicated in Java library classes and applications. We describe a generalization of a Java Virtual Machine (JVM) to support multiple inheritance of code. Our approach places code in interfaces, without requiring language syntax changes or compiler modifications. In our extended ...
متن کاملA dynamic, portable and safe approach to byte-code transformation
A powerful feature of the Java programming language is its user-definable class loading policy, which when combined with the namespace independence between class loaders, allows portable implementation of semidynamic program transformations. Such transformations can be used for a range of purposes, including optimization and semantic extension. In this paper we present a framework for semantic ...
متن کاملTargeting the Java Virtual Machine with Genericity, Multiple Inheritance, Assertions and Expanded Types
متن کامل
Sharing the Runtime Representation of Classes Across Class Loaders
One of the most distinctive features of the Java programming language is the ability to specify class loading policies. Despite the popularity of class loaders, little has been done to reduce the cost associated with defining the same class by multiple loaders. In particular, implementations of the Java virtual machine (JVM ) create a complete runtime representation of each class regardless of ...
متن کاملJam - A Smooth Extension of Java with Mixins
In this paper we present Jam, an extension of the Java language supporting mixins, that is, parametric heir classes. A mixin declaration in Jam is similar to a Java heir class declaration, except that it does not extend a fixed parent class, but simply specifies the set of fields and methods a generic parent should provide. In this way, the same mixin can be instantiated on many parent classes,...
متن کامل